import request from "../utils/request";


// 获取退货单的货物
export function getReturnGoods(returnId) {
  return request({
    url: '/returnGoods/list',
    method: 'get',
    params: {
      returnId: returnId
    }
  })
}

// 增加退货单的货物
export function addReturnGoods(data) {
  return request({
    url: '/returnGoods/add',
    method: 'post',
    params: {
      goods_id: data.goods_id,
      returnId: data.returnId,
      unit_price: data.unit_price,
      num: data.num
    }
  })
}

// 删除退货单货物
export function deleteReturnGoods(returnId) {
  return request({
    url: '/returnGoods/delete',
    method: 'post',
    params: {
      returnId: returnId
    }
  })
}
